package com.banciyuan.bcywebview.base.factory;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import java.util.List;

import de.greenrobot.daoexample.model.Ask;

/**
 * Created by hfxt2008 on 14-8-22.
 * 生成ask类的工厂类，用于解析json，然后生成一个list<ask>
 */
public class AskFactory {

    public static List<Ask> createAsk(String json) throws Exception {
        Gson gson = new Gson();
        return gson.fromJson(json, new TypeToken<List<Ask>>() {
        }.getType());
    }
}